fix test suite
authorJoey Hess <joeyh@joeyh.name>
Mon, 22 Sep 2025 19:00:26 +0000 (15:00 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 22 Sep 2025 19:00:26 +0000 (15:00 -0400)
dfbf76e2ca50d31eca6dee253c5bf3c892301463 broke it.

enableremote with the same type= as initremote had before might be worth
allowing, but I'll wait and see if someone else complains

Test.hs

diff --git a/Test.hs b/Test.hs
index 6de37709dca409cbcf4b0a9f1fda4b9599e94c80..008d525d805faebff9732f4136be873a77d15153 100644 (file)
--- a/Test.hs
+++ b/Test.hs
@@ -1918,19 +1918,19 @@ test_gpg_crypto = do
   where
        testscheme scheme = intmpclonerepo $ test_with_gpg $ \gpgcmd environ -> do
                createDirectory (literalOsPath "dir")
-               let initps =
+               let ps =
                        [ "foo"
-                       , "type=directory"
                        , "encryption=" ++ scheme
                        , "directory=dir"
                        , "highRandomQuality=false"
                        ] ++ if scheme `elem` ["hybrid","pubkey"]
                                then ["keyid=" ++ Utility.Gpg.testKeyId]
                                else []
+               let initps = ps ++ [ "type=directory" ]
                git_annex' "initremote" initps (Just environ) "initremote"
                git_annex_shouldfail' "initremote" initps (Just environ) "initremote should not work when run twice in a row"
-               git_annex' "enableremote" initps (Just environ) "enableremote"
-               git_annex' "enableremote" initps (Just environ) "enableremote when run twice in a row"
+               git_annex' "enableremote" ps (Just environ) "enableremote"
+               git_annex' "enableremote" ps (Just environ) "enableremote when run twice in a row"
                git_annex' "get" [annexedfile] (Just environ) "get of file"
                annexed_present annexedfile
                git_annex' "copy" [annexedfile, "--to", "foo"] (Just environ) "copy --to encrypted remote"